package com.business.system.official.toursism.websitehotel.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.business.system.official.toursism.websitehotel.entity.WebsiteHotel;
import com.business.system.official.toursism.websitehotel.vo.data.WebsiteHotelDetailData;
import com.business.system.official.toursism.websitehotel.from.WebsiteHotelSaveFrom;
import com.business.system.official.toursism.websitehotel.from.WebsiteHotelUpdateFrom;
import com.seed.core.exception.ServiceException;
import com.seed.core.pojo.dto.SeedMessageDTO;
import com.seed.core.pojo.service.SeedSystemService;

import java.io.Serializable;

/**
 * @description 乌镇酒店
 * @author CodeGenerator
 * @date   2025-01-25
 * @version V1.0
 */
public interface WebsiteHotelService extends SeedSystemService<WebsiteHotel> {

    /**
     * 分页查询
     *
     * @param page         分页对象
     * @param queryWrapper 实体对象封装操作类
     * @return 分页对象
     * @throws ServiceException 业务层异常
     */
    IPage<WebsiteHotelDetailData> pageVO(IPage<WebsiteHotel> page, Wrapper<WebsiteHotel> queryWrapper) throws ServiceException;

    /**
     * 插入一条记录（选择字段，策略插入）
     *
     * @param from 实体对象
     * @return 是否成功
     * @throws ServiceException 业务层异常
     */
    SeedMessageDTO save(WebsiteHotelSaveFrom from) throws ServiceException;

    /**
     * 根据 ID 选择修改
     *
     * @param from 实体对象
     * @return 是否成功
     * @throws ServiceException 业务层异常
     */
    SeedMessageDTO updateById(WebsiteHotelUpdateFrom from) throws ServiceException;

    /**
     * 根据 ID 查询
     *
     * @param id 主键ID
     * @return 对应实体
     * @throws ServiceException 业务层异常
     */
    WebsiteHotelDetailData getDetailById(Serializable id) throws ServiceException;
}
